package com.umeng.analytics.pro;

import android.content.Context;
import android.text.TextUtils;

import org.json.JSONArray;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

public class d {
    public class a {
        public class d$a$a {
            public static final String a = "key";
            public static final String b = "totalTimestamp";
            public static final String c = "value";
            public static final String d = "count";
            public static final String e = "label";
            public static final String f = "timeWindowNum";

            public d$a$a() {

            }
        }

        public class b {
            public static final String a = "TEXT";
            public static final String b = "TEXT";
            public static final String c = "INTEGER";
            public static final String d = "INTEGER";
            public static final String e = "TEXT";
            public static final String f = "TEXT";

            public b() {

            }
        }

        public static final String a = "aggregated";
        public static final String b = "aggregated_cache";

        public a() {

        }
    }

    public class d$b {
        public class d$b$a {
            public static final String a = "ck";

            public d$b$a() {

            }
        }

        public class d$b$b {
            public static final String a = "TEXT";

            public d$b$b() {

            }
        }

        public static final String a = "limitedck";

        public d$b() {

        }
    }

    public class c {
        public class d$c$a {
            public static final String a = "key";
            public static final String b = "timeStamp";
            public static final String c = "count";
            public static final String d = "label";

            public d$c$a() {

            }
        }

        public class d$c$b {
            public static final String a = "TEXT";
            public static final String b = "INTEGER";
            public static final String c = "INTEGER";
            public static final String d = "TEXT";

            public d$c$b() {

            }
        }

        public static final String a = "system";

        public c() {

        }
    }

    public static final String a = "/data/data/";
    public static final String b = "/databases/cc/";
    public static final String c = "cc.db";
    public static final int d = 1;
    public static final String e = "Id";
    public static final String f = "INTEGER";

    public d() {

    }

    public static JSONArray a(String arg4) {
        String[] v1 = arg4.split("!");
        JSONArray v2 = new JSONArray();
        int v0;
        for (v0 = 0; v0 < v1.length; ++v0) {
            v2.put(v1[v0]);
        }

        return v2;
    }

    public static String a(Context arg2) {
        return "/data/data/" + arg2.getPackageName() + "/databases/cc/";
    }

    public static String a(List arg1) {
        return TextUtils.join("!", ((Iterable) arg1));
    }

    public static List b(String arg2) {
        return new ArrayList(Arrays.asList(arg2.split("!")));
    }

    public static List b(List arg4) {
        ArrayList v1 = new ArrayList();
        try {
            Iterator v2 = arg4.iterator();
            while (v2.hasNext()) {
                Object v0_1 = v2.next();
                if (Collections.frequency(((Collection) v1), v0_1) > 0) {
                    continue;
                }

                ((List) v1).add(v0_1);
            }
        } catch (Exception v0) {
            v0.printStackTrace();
        }

        return ((List) v1);
    }
}

